import { createRouter,createWebHistory } from "vue-router"
import component1 from "../component1.vue"
import component2 from "../component2.vue"
import component3 from "../component3.vue"
import component21 from "../component21.vue"
import component22 from "../component22.vue"
import component23 from "../component23.vue"
const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/1",
      component: component1
    },
    {
      path: "/2",
      component: component2,
      children: [
        {
          path: "child1/:id/:name/:content",
          name: "2.1",
          component: component21,
          props: true
        },
        {
          path: "child2",
          name: "2.2",
          component: component22
        },
        {
          path: "child3",
          name: "2.3",
          component: component23
        }
      ]
    },
    {
      path: "/3",
      component: component3 
    }
  ]
})
export default router